package com.atguigu.eduservice.service.impl;

import com.atguigu.eduservice.entity.EduTeacher;
import com.atguigu.eduservice.mapper.EduTeacherMapper;
import com.atguigu.eduservice.service.EduTeacherService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 讲师 服务实现类
 * </p>
 *
 * @author wangshuai
 * @since 2021-01-26
 */
@Service
public class EduTeacherServiceImpl extends ServiceImpl<EduTeacherMapper, EduTeacher> implements EduTeacherService {

    @Override
    public List<EduTeacher> getAllTeacherList() {

        QueryWrapper<EduTeacher> wrapper = new QueryWrapper<>();

        List<EduTeacher> list = baseMapper.selectList(wrapper);

        return list;
    }

    @Override
    public List<Map> getAllTeacher() {
        List<Map> list = baseMapper.getAllTeacher();

        return list;
    }
}
